import request from '@/utils/_request'


/** 竞赛申报列表*/
export function declareList(query) {
    return request({
        url: '/admin/contest/active/user/query',
        method: 'post',
        data: query,
    })
}

export function declareById(id) {
    return request({
        url: `/admin/contest/active/user/queryById/${id}`,
        method: 'get',
    })
}

/** 待修改 */
export function report(id) {
    return request({
        url: `/admin/contest/prepare/person/apply/${id}`,
        method: 'post',
    })
}

export function giveUp(data) {
    return request({
        url: `/admin/contest/prepare/abandon`,
        method: 'post',
        data: data,
    })
}

/** 人员申报列表 */
export function staffList(query) {
    return request({
        url: `/admin/contest/query`,
        method: 'post',
        data: query,
    })
}

/** 人员信息上报 */
export function staffReport(id) {
    return request({
        url: `/admin/contest/prepare/person/apply/${id}`,
        method: 'post',
    })
}

/** 上传竞赛结果v2 */
export function uploadContestResv2(id, data) {
    return request({
        url: `/admin/contest/result/person/apply/${id}`,
        method: 'POST',
        data: data
    })
}

/** 放弃参赛 */
export function abandon(data) {
    return request({
        url: `/admin/contest/prepare/abandon`,
        method: 'post',
        data: data
    })

}

/**人员信息查询*/
export function getContestTeam(id) {
    return request({
        url: '/admin/contest/active/user/queryById/' + id,
        method: 'GET'
    })
}